/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.ibrae.excelparser1.excelstorageentities.entities;

import jxl.Cell;

import java.util.ArrayList;
import java.util.LinkedList;


/**
 *
 * @author murr
 */
public class ExcelFile {
    //~ Instance fields --------------------------------------------------------

    private CommonInfo commonInfo;
    private InfoSheetHeader infoSheetHeader;
    private LinkedList<ExcelField> rows;
    private ArrayList<Cell[]> finallyBrokenRows;

    //~ Constructors -----------------------------------------------------------

    public ExcelFile(CommonInfo commonInfo, InfoSheetHeader infoSheetHeader,
                     LinkedList<ExcelField> rows) {
        this.commonInfo = commonInfo;
        this.infoSheetHeader = infoSheetHeader;
        this.rows = rows;
    }

    //~ Methods ----------------------------------------------------------------

    public CommonInfo getCommonInfo() {
        return commonInfo;
    }

    public InfoSheetHeader getInfoSheetHeader() {
        return infoSheetHeader;
    }

    public LinkedList<ExcelField> getRows() {
        return (rows == null) ? new LinkedList<ExcelField>() : rows;
    }

    public void add(ArrayList<Cell[]> brokenExcelRows) {
        finallyBrokenRows = brokenExcelRows;
    }

    public ArrayList<Cell[]> getFinallyBrokenRows() {
        return finallyBrokenRows;
    }
}
